﻿using FreeSql;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace App.Components
{
    public static class FreeSqlHelper
    {

        public static ISelect<T> Page<T>(this ISelect<T> obj,LayUIPagination page)
        {
            page.count = obj.Count();
            return obj.Page(page.page, page.limit);
        }
        //public static ISelect<T> SortAndPage<T>(this ISelect<T> obj, Func<ISelect<T>, ISelect<T>> orderBy = null, LayUIPagination page)
        //{
        //    page.count = obj.Count();
        //    return obj.Page(page.page, page.limit);
        //}

    }
}
